import {createRouter,createWebHistory } from 'vue-router';
import Reg from './pages/Reg.vue';
import Login from './pages/Login.vue';
import Manage from './pages/Manage.vue';
import Student from './pages/Student.vue';
import Class from './pages/Class.vue';
import Teacher from './pages/Teacher.vue';
import Test from './pages/Test.vue';

import Test1 from './pages/Test1.vue';

const routes = [
  { path: '/test', component: Test },
  { path: '/test1', component: Test1 },
    { path: '/reg', component: Reg },
    { path: '/login', component: Login },
    { path: '/manage', component: Manage,children:[
        { path: 'student', component: Student },
        { path: 'class', component: Class },
        { path: 'teacher', component: Teacher },
    ] },
  ]

  const router = createRouter({
    // 4. 内部提供了 history 模式的实现。为了简单起见，我们在这里使用 hash 模式。
    history: createWebHistory(),
    routes, // `routes: routes` 的缩写
  })

  export default router;